package org.esprit.ocm.client.rpc.oca;

import java.util.List;

import org.esprit.ocm.model.oca.HostOca;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("HostOcaService.rpc")
public interface HostOcaService extends RemoteService {

	/**
	 * List All hosts
	 * 
	 * @param client
	 * @return
	 * @throws Exception
	 */
	public List<HostOca> listAll(String secret, String endpoint) throws Exception;

	/**
	 * Describe Host
	 * 
	 * @param client
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public HostOca info(String secret, String endpoint, int id) throws Exception;

	/**
	 * Allocate new host
	 * 
	 * @param client
	 * @param hostname
	 * @param im
	 * @param vmm
	 * @param tm
	 * @return
	 * @throws Exception
	 */
	public String allocate(String secret, String endpoint, String hostname, String im, String vmm, String tm) throws Exception;

	/**
	 * Delete a host
	 * 
	 * @param client
	 * @param hostId
	 * @return 
	 * @throws Exception
	 */
	public String delete(String secret, String endpoint, int hostId) throws Exception;

	/**
	 * Enable host
	 * 
	 * @param client
	 * @param hostId
	 * @return
	 * @throws Exception
	 */
	public String enable(String secret, String endpoint, int hostId) throws Exception;

	/**
	 * disable host
	 * 
	 * @param client
	 * @param hostId
	 * @return
	 * @throws Exception
	 */
	public String disable(String secret, String endpoint, int hostId) throws Exception;
}
